import {
  mapGetters
} from 'vuex'
export default {
  computed: {
    ...mapGetters('cart', ['total','checkedCount'])
  },
  onLoad() {
    this._onShow()
  },
  watch:{
    checkedCount(){
      this._onShow()
    }
  },
  methods: {
    _onShow() {
      uni.setTabBarBadge({
        index: 2,
        text: this.checkedCount + ''
      })
    }
  }
}
